﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CellInfo.aspx.cs" Inherits="Support_CellInfo" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>基站信息管理</title>
    <script type="text/javascript" src="../Scripts/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="../Scripts/jquery-ui-1.9.2.custom.min.js"></script>
    <script type="text/javascript" src="../Scripts/CellAlarm/CellInfo.js"></script>
    <link rel="Stylesheet" href="../Content/redmond/jquery-ui-1.9.2.custom.min.css" />
    <link rel="stylesheet" href="../Content/CellAlarm/CellInfo.css" />
</head>
<body>
    <form id="form1" runat="server">
        <div id="CellDiv">
        <p>
            <label for="CellInfo_I" style="font-size:14px;">基站:</label>
            <asp:TextBox id="CellInfo_I" runat="server" MaxLength="100" CssClass="text ui-widget-content"></asp:TextBox>
            <asp:Button ID="QueryCell" runat="server" Text="查询" OnClick="QueryUser_Click" />
            <input id="AddCell" type="button" value="新增基站" />
        </p>
        <fieldset class="ui-grid-a" id="CellBox">
        <div id="CellDIV">
            <asp:GridView ID="CellInfo" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！"
                Width="100%" CssClass="ui-widget ui-widget-content" DataKeyNames="CELL_CHNAME"
                OnRowCancelingEdit="CellInfo_RowCancelingEdit" OnRowEditing="CellInfo_RowEditing"
                OnRowUpdating="CellInfo_RowUpdating" OnRowDataBound="CellInfo_RowDataBound" OnRowDeleting="CellInfo_RowDeleting">
                <HeaderStyle CssClass="ui-widget-header" />
                <Columns>
                    <asp:BoundField DataField="CELL_CHNAME" HeaderText="基站" SortExpression="CELL_CHNAME" ReadOnly="true">
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="简称" SortExpression="CELL_ENNAME">
                        <ItemTemplate>
                            <asp:Label ID="CELL_ENNAME" runat="server" Text='<%# Bind("CELL_ENNAME") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="CELL_ENNAME_T" runat="server" Text='<%# Bind("CELL_ENNAME") %>'></asp:TextBox>
                            <asp:RequiredFieldValidator runat="server" ControlToValidate="CELL_ENNAME_T" ID="V_Enname"
                                 ErrorMessage="请输入简称"></asp:RequiredFieldValidator>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="类别" SortExpression="CELL_CLASS">
                        <ItemTemplate>
                            <asp:Label ID="CELL_CLASS" runat="server" Text='<%# Bind("CELL_CLASS") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="CELL_CLASS_D" runat="server">
                                <asp:ListItem Text="A类" Value="A类"></asp:ListItem>
                                <asp:ListItem Text="B类" Value="B类"></asp:ListItem>
                                <asp:ListItem Text="C类" Value="C类"></asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="网别" SortExpression="CELL_NET">
                        <ItemTemplate>
                            <asp:Label ID="CELL_NET" runat="server" Text='<%# Bind("CELL_NET") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="CELL_NET_D" runat="server">
                                <asp:ListItem Text="2G" Value="2G"></asp:ListItem>
                                <asp:ListItem Text="3G" Value="3G"></asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="小区编号" SortExpression="CELL_NUMBER">
                        <ItemTemplate>
                            <asp:Label ID="CELL_NUMBER" runat="server" Text='<%# Bind("CELL_NUMBER") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:TextBox ID="CELL_NUMBER_T" runat="server" Text='<%# Bind("CELL_NUMBER") %>'></asp:TextBox>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="室分站">
                        <ItemTemplate>
                            <asp:Label ID="CELL_IN" runat="server" Text='<%# Bind("CELL_IN") %>'></asp:Label>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <asp:DropDownList ID="CELL_IN_D" runat="server">
                                <asp:ListItem Text="是" Value="是"></asp:ListItem>
                                <asp:ListItem Text="否" Value="否"></asp:ListItem>
                            </asp:DropDownList>
                        </EditItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="Modify" runat="server" CausesValidation="True" CommandName="Update"
                                Text="更新"></asp:LinkButton>
                            <asp:LinkButton ID="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                Text="取消"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="Edit" runat="server" CausesValidation="False" CommandName="Edit"
                                Text="编辑"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField ShowHeader="false">
                        <ItemTemplate>
                            <asp:LinkButton ID="Delete" runat="server" CausesValidation="False" CommandName="Delete"
                                Text="删除" OnClientClick="return confirm('确认删除该基站吗？');"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
            <div style="text-align: right; padding: 5px;">
                <webdiyer:AspNetPager ID="CellPager" runat="server" OnPageChanged="CellPager_PageChanged">
                </webdiyer:AspNetPager>
            </div>
            </div>
            </fieldset>
            <fieldset class="ui-grid-a" id="UnCellBox">
        <legend>未维护基站列表</legend>
        <div id="UnCellDiv">
            <asp:GridView ID="UnCellList" runat="server" AutoGenerateColumns="False" EmptyDataText="对不起,未找到相关数据！"
                Width="100%" CssClass="ui-widget ui-widget-content">
                <HeaderStyle CssClass="ui-widget-header" />
                <Columns>
                    <asp:BoundField DataField="Cell_Name" HeaderText="基站名称">
                    </asp:BoundField>
                    <asp:BoundField DataField="Net" HeaderText="网别" />
                </Columns>
            </asp:GridView>
            <div style="text-align: right; padding: 5px;">
                <webdiyer:AspNetPager ID="UnCellPage" runat="server" OnPageChanged="UnCellPager_PageChanged">
                </webdiyer:AspNetPager>
            </div>
        </div>
        </fieldset>
        <fieldset class="ui-grid-a" id="uploadCell">
            <legend>批量导入基站信息</legend>
            <div>
            <p>
                <label for="CellInfoload" class="lTitle">告警信息:</label>
                <asp:FileUpload ID="CellInfoload" runat="server" CssClass="ui-widget-content" />
               <asp:Button ID="UploadBtn" runat="server" Text="点击上传" OnClick="UploadBtn_Click" /></p>
            <p>
                <a href="../Content/模板.xls">点击下载模板</a>
            </p>
            </div>
        </fieldset>
        </div>
        <div id="AddCellDiv" title="新增基站" style="display:none;">
        <fieldset>
            <p>
            <label for="CellInfo_A">基站:</label>
            <asp:TextBox ID="CellInfo_A" runat="server" CssClass="text ui-widget-content ui-corner-all" MaxLength="20" Width="120"></asp:TextBox></p>
            <p>
            <label for="CellEnInfo_A">简称:</label>
            <asp:TextBox ID="CellEnInfo_A" runat="server" CssClass="text ui-widget-content ui-corner-all" MaxLength="20" Width="120"></asp:TextBox></p>
            <p>                
                <label for="CellClass_A">类别:</label>
                <asp:DropDownList ID="CellClass_A" runat="server" CssClass="ui-widget-content">
                    <asp:ListItem Text="A类" Value="A类" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="B类" Value="B类"></asp:ListItem>
                    <asp:ListItem Text="C类" Value="C类"></asp:ListItem>
                </asp:DropDownList>
            </p>
            <p>                
                <label for="CellNet_A">网别:</label>
                <asp:DropDownList ID="CellNet_A" runat="server" CssClass="ui-widget-content">
                    <asp:ListItem Text="2G" Value="2G" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="3G" Value="3G"></asp:ListItem>
                </asp:DropDownList>
            </p>
            <p><label for="CellNumber_A">小区编号:</label>    
            <asp:TextBox ID="CellNumber_A" runat="server" CssClass="text ui-widget-content ui-corner-all" MaxLength="2" Width="120"></asp:TextBox></p>
            <p>
            <label for="CELL_ADDRESS"  style="vertical-align: top;">
                位置信息:</label>
            <asp:TextBox runat="server" ID="CELL_ADDRESS" CssClass="text ui-widget-content ui-corner-all"
                TextMode="MultiLine" Rows="4" Columns="13"></asp:TextBox></p>   
        </fieldset>
        <p id="ActionP">
        <asp:Button ID="BtnCreate" runat="server" Text="新增" OnClick="BtnCreate_Click"/>
        <input id="BtnCancel" type="button" value="取消" /></p>
    </div>
    <div id="dialog" title="提示" style="display:none;">
        <img src="../Content/Images/loading_icon.gif" alt="正在上传中..." />
        <span id="tip">正在上传中...</span>
        </div> 
    </form>
</body>
</html>
